﻿using Reece.Open.Mvc.Common;
using Reece.Open.Objects;

namespace Reece.Open.Mvc.Three.Factories
{
    internal static class MenuFactory
    {
        public enum ContainerType
        {
            MainMenu,
            SubMenu
        }

        public static INestedMenu GetMenuContainer(ContainerType type, string id = null, string css = null, bool renderInitScript = false )
        {
            INestedMenu result;
            switch (type)
            {
                case ContainerType.SubMenu:
                    result = new SubMenu(id);
                    break;
                case ContainerType.MainMenu:
                default:
                    result = new TopMenu(id, css) {RenderScript = renderInitScript};
                    break;
            }
            return result;
        }
    }
}
